loadfile("lib/turtle_utils.lua")()

function main(x, z, y, height)
	if x == nil or z == nil or y == nil or height == nil then
		print_error("missing parameters")
		return
	end
	
	x = tonumber(x)
	z = tonumber(z)
	y = tonumber(y)
	height = tonumber(height)
	
	up(height - y - 4)
end

function print_error(err_msg)
	print("error: " .. err_msg)
	print("usage: gps_init X Z Y HEIGHT")
end

argv = { ... }
main(argv[1], argv[2], argv[3], argv[4])